---
title: In-Memory Storage
sidebarTitle: In-Memory
---

Agno supports using In-Memory storage with the `InMemoryDb` class. By doing this, you will be able to use all features that depend on having a database, without having to set one up.

<Warning>
Using the In-Memory storage is not recommended for production applications.
Use it for demos, testing and any other use case where you don't want to setup a database.
</Warning>

## Usage

```python
from agno.agent import Agent
from agno.db.in_memory import InMemoryDb

# Setup in-memory database
db = InMemoryDb()

# Create agent with database
agent = Agent(db=db)
```

## Developer Resources

- View [Cookbook](https://github.com/agno-agi/agno/tree/main/cookbook/db/in_memory/in_memory_storage_for_agent.py)
